<table class="table table-condensed table-hover">
    <thead>
    <tr>
        <th>#</th>
        <th>参数名称</th>
        <th>参数值</th>
        <th>参数说明</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
        <#if configPage.elements?size gt 0>
            <#list configPage.elements as config>
                <tr>
                    <td>${config_index + 1}</td>
                    <td>${config.configName}</td>
                    <td>${config.configValue}</td>
                    <td>${config.description}</td>
                    <td>
                        <a href="${request.contextPath}/manage/config/form?configId=${config.configId}" class="btn btn-sm btn-warning">编辑</a>
                        <a href="${request.contextPath}/manage/config/delete?configId=${config.configId}" class="btn btn-sm btn-danger btn-remove">删除</a>
                    </td>
                </tr>
            </#list>
        <#else>
            <tr>
                <td colspan="5">
                    <p class="alert alert-warning"><i class="fa fa-exclamation-triangle "></i> 没有你想要的数据！</p>
                </td>
            </tr>
        </#if>
    </tbody>
</table>
<ul class="pager" style="margin:0px;"></ul>
<script type="text/javascript">
    $(function(){

        <#if configPage.totalPage gt 1>
            $(".pager").bootstrapPaginator({
                bootstrapMajorVersion: 3,
                currentPage: ${configPage.pageNumber},
                totalPages: ${configPage.totalPage},
                size: "small",
                alignment: "left",
                onPageClicked: function(e, oe, type, page){
                    getData(page);
                }
            });
        </#if>

        $(".btn-remove").click(function(){
            var removelink = $(this).attr("href");
            swal({
                title: "",
                text: "你确认删除此数据？",
                type: "warning",
                confirmButtonText: "我确认",
                closeOnConfirme: false
            }, function(){
                $.post(removelink, function(data){
                    if (data.result == "success"){
                        swal("数据已删除！", "", "success");
                    }
                });
            });
            return false;
        });
    })
</script>